/**
 * 
 */
package by.jtraining.london.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;

import com.google.common.base.Objects;

/**
 * @author Irina Pakhomova
 * 
 */
@Entity
public class Student extends User implements Serializable {
	private static final long serialVersionUID = 1542752147761722L;

	private Course course;
	private String phone;
	private Education education;
	@Column(name="graduation_year")
	private int graduationYear;
	@Column(name="place_of_employment_or_study")
	private String placeOfEmploymentOrStudy;
	@Column(name="purpose_going_to_training")
	private String purposeGoingToTraining;
	@Column(name="is_upload_application_form")
	private Boolean isUploadApplicationForm;
	@Column(name="lector_notes")
	private String lectorNotes;
	private Date birthDay;
	@Column(name="register_day")
	private Date registerDay;
	@Column(name="student_date")
	private Date studentDate;

	public Student() {
	}

	// login==email
	public Student(String firstName, String lastName, Course course,
			 String email, String phone,Date birthDay, Education education,
			int graduationYear, String placeOfEmploymentOrStudy,
			String purposeGoingToTraining) {
		super(firstName, lastName, email, phone, false);
		this.course = course;
		this.birthDay = birthDay;
		this.phone = phone;
		this.education = education;
		this.graduationYear = graduationYear;
		this.placeOfEmploymentOrStudy = placeOfEmploymentOrStudy;
		this.purposeGoingToTraining = purposeGoingToTraining;
		isUploadApplicationForm = false;

	}

	@Override
	public String toString() {
		return Objects.toStringHelper(this).add("id", getId())
				.add("First name", getFirstName()).add("Last name", getLastName())
				.add("Date of Birth", getBirthDay()).add("name of course", getCourse())
 				.add("phone", getPhone()).add("email", getLogin())
						.toString();
	}

	public Course getCourse() {
		return course;
	}

	public void setCourse(Course course) {
		this.course = course;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public Education getEducation() {
		return education;
	}

	public void setEducation(Education education) {
		this.education = education;
	}

	public int getGraduationYear() {
		return graduationYear;
	}

	public void setGraduationYear(int graduationYear) {
		this.graduationYear = graduationYear;
	}

	public String getPlaceOfEmploymentOrStudy() {
		return placeOfEmploymentOrStudy;
	}

	public void setPlaceOfEmploymentOrStudy(String placeOfEmploymentOrStudy) {
		this.placeOfEmploymentOrStudy = placeOfEmploymentOrStudy;
	}

	public String getPurposeGoingToTraining() {
		return purposeGoingToTraining;
	}

	public void setPurposeGoingToTraining(String purposeGoingToTraining) {
		this.purposeGoingToTraining = purposeGoingToTraining;
	}

	public Boolean getIsUploadApplicationForm() {
		return isUploadApplicationForm;
	}

	public void setIsUploadApplicationForm(Boolean isUploadApplicationForm) {
		this.isUploadApplicationForm = isUploadApplicationForm;
	}

	public String getLectorNotes() {
		return lectorNotes;
	}

	public void setLectorNotes(String lectorNotes) {
		this.lectorNotes = lectorNotes;
	}

	public Date getBirthDay() {
		return birthDay;
	}

	public void setBirthDay(Date birthDay) {
		this.birthDay = birthDay;
	}

	public Date getRegisterDay() {
		return registerDay;
	}

	public void setRegisterDay(Date registerDay) {
		this.registerDay = registerDay;
	}

	public Date getStudentDate() {
		return studentDate;
	}

	public void setStudentDate(Date studentDate) {
		this.studentDate = studentDate;
	}

	
}
